﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace jindong
{
    public class User_profile
    {
        /// <summary>
        /// ⽤户ID
        /// </summary>
        [Required]
        [Key]
        [ForeignKey("User_id")]
        public User? User { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [StringLength(32)]
        public string? real_name { get; set; }

        
        /// <summary>
        /// 性别
        /// </summary>
        public int gender { get; set; }

        
        /// <summary>
        /// 出⽣⽇期
        /// </summary>
        public DateTime birthday { get; set; }


        /// <summary>
        /// 身份证号
        /// </summary>
        [StringLength(32)]
        public string? id_card { get; set; }


        /// <summary>
        /// 头像OSS地址
        /// </summary>
        [StringLength(512)]
        public string? avatar_url { get; set; }


        /// <summary>
        /// 职业
        /// </summary>
        [StringLength(64)]
        public string? occupation { get; set; }

        
        /// <summary>
        /// 婚姻状况
        /// </summary>
        public bool marital_status { get; set; }

        [Column]
        /// <summary>
        /// 信息创建时间
        /// </summary>
        [Required]
        public DateTime create_time { get; set; }

        [Column]
        /// <summary>
        /// 最后修改时间
        /// </summary>
        [Required]
        public DateTime update_time { get; set; }
    }
}
